Skip to content

ReactiveRecyclerViewAdapter.GetItemViewType(int) method

Defined in

Type: ReactiveRecyclerViewAdapter Namespace: ReactiveUI.AndroidX Assembly: ReactiveUI.AndroidX.dll

Applies to

net10.0-android36.0

Overloads

  1. public override int GetItemViewType(int position)

  2. public virtual int GetItemViewType(int position, TViewModel? viewModel)

1. Overload

public override int GetItemViewType(int position)

View source (opens in a new tab)

Inherited documentation

These docs were inherited from Adapter. The member doesn't override them on this type.

Parameters

NameTypeDescription
positionint (opens in a new tab)--

Returns: int (opens in a new tab)

2. Overload

public virtual int GetItemViewType(int position, TViewModel? viewModel)

View source (opens in a new tab)

Summary: Determine the View that will be used/re-used in lists where the list contains different cell designs.

Parameters

NameTypeDescription
positionint (opens in a new tab)The position of the current view in the list.
viewModelTViewModel?The ViewModel associated with the current View.

Returns: int (opens in a new tab) -- An ID to be used in OnCreateViewHolder.